package com.sg.dto.biz.component.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc UsersDto
 * @使用场景
 */
@Data
public class UsersDto extends BaseDto implements Serializable {

    /**
     * 绑定手机
     */
    @NotNull(message = "绑定手机不能为空")
    @ApiModelProperty("绑定手机")
    private String phone;


    /**
     * 真实姓名
     */
    @ApiModelProperty("真实姓名")
    private String idCardName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        UsersDto that = (UsersDto) o;
        return phone == that.phone && idCardName == that.idCardName;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), phone, idCardName);
    }

}
